﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace A_ManageUsers
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            AbilitiesList.ItemsSource = DataModels.Abilities.AbilitiesL;
            RolesList.ItemsSource = DataModels.Roles.RolesL;
            UsersList.ItemsSource = DataModels.Users.UsersL;
        }

        private void NewAbility(object sender, RoutedEventArgs e)
        {
            var NA = new NewAbility();
            NA.ParentLayoutRoot = LayoutRoot;
            NA.ShowDialog();
        }

        private void NewRole(object sender, RoutedEventArgs e)
        {
            var NR = new NewRole();
            NR.ParentLayoutRoot = LayoutRoot;
            NR.ShowDialog();
        }

        private void NewUser(object sender, RoutedEventArgs e)
        {
            var NU = new NewUser();
            NU.ParentLayoutRoot = LayoutRoot;
            NU.ShowDialog();
        }

        private void BulkNewUser(object sender, RoutedEventArgs e)
        {
            var BNU = new BulkNewUserR();
            BNU.ParentLayoutRoot = LayoutRoot;
            //var BNU = new BulkNewUser();
            //BNU.Show();
            BNU.ShowDialog();
        }
    }
}
